{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "from time import time\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn import svm\n",
    "from sklearn.decomposition import PCA\n",
    "from sklearn.preprocessing import MinMaxScaler\n",
    "import warnings\n",
    "warnings.filterwarnings(\"ignore\", category=FutureWarning, module=\"sklearn\")\n",
    "train = pd.read_csv('train.csv')\n",
    "test = pd.read_csv('test.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 42000 entries, 0 to 41999\n",
      "Columns: 785 entries, label to pixel783\n",
      "dtypes: int64(785)\n",
      "memory usage: 251.5 MB\n"
     ]
    }
   ],
   "source": [
    "# 查看训练集信息\n",
    "train.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 28000 entries, 0 to 27999\n",
      "Columns: 784 entries, pixel0 to pixel783\n",
      "dtypes: int64(784)\n",
      "memory usage: 167.5 MB\n"
     ]
    }
   ],
   "source": [
    "# 查看测试集，缺少Label一列\n",
    "test.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "count       785\n",
      "unique        1\n",
      "top       False\n",
      "freq        785\n",
      "dtype: object\n",
      "\n",
      "count       784\n",
      "unique        1\n",
      "top       False\n",
      "freq        784\n",
      "dtype: object\n"
     ]
    }
   ],
   "source": [
    "# 查看训练集是否有缺失值,结果是不存在缺失值\n",
    "print(train.isnull().any().describe())\n",
    "print()\n",
    "# 查看测试集是否有缺失值,结果是不存在缺失值\n",
    "print(test.isnull().any().describe())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(42000, 785)\n",
      "(28000, 784)\n",
      "   label  pixel0  pixel1  pixel2  pixel3  pixel4  pixel5  pixel6  pixel7  \\\n",
      "0      1       0       0       0       0       0       0       0       0   \n",
      "1      0       0       0       0       0       0       0       0       0   \n",
      "2      1       0       0       0       0       0       0       0       0   \n",
      "3      4       0       0       0       0       0       0       0       0   \n",
      "4      0       0       0       0       0       0       0       0       0   \n",
      "\n",
      "   pixel8    ...     pixel774  pixel775  pixel776  pixel777  pixel778  \\\n",
      "0       0    ...            0         0         0         0         0   \n",
      "1       0    ...            0         0         0         0         0   \n",
      "2       0    ...            0         0         0         0         0   \n",
      "3       0    ...            0         0         0         0         0   \n",
      "4       0    ...            0         0         0         0         0   \n",
      "\n",
      "   pixel779  pixel780  pixel781  pixel782  pixel783  \n",
      "0         0         0         0         0         0  \n",
      "1         0         0         0         0         0  \n",
      "2         0         0         0         0         0  \n",
      "3         0         0         0         0         0  \n",
      "4         0         0         0         0         0  \n",
      "\n",
      "[5 rows x 785 columns]\n"
     ]
    }
   ],
   "source": [
    "# 查看训练集和测试集的行列数\n",
    "print(train.shape)\n",
    "print(test.shape)\n",
    "print(train.head())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 将训练集中的特征和标签列分开\n",
    "X = train.iloc[:,1:]\n",
    "y = train.iloc[:,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\Python\\Anaconda\\lib\\site-packages\\ipykernel_launcher.py:7: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.\n",
      "  import sys\n"
     ]
    },
    {
     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SSHdABAABiYAd0AACAGBhMAQAAxMBgCgAAIAYGUwAAADEwmAIAAIiBwRQAAEAMDKYAAABiYDAFAAAQw/8DyMWN26gQej4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 720x360 with 10 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 查看训练集的数字\n",
    "plt.figure(figsize = (10,5))\n",
    "\n",
    "for num in range(0,10):\n",
    "    plt.subplot(2,5,num+1)\n",
    "    #将长度为784的向量数据转化为28*28的矩阵\n",
    "    grid_data = X.iloc[num].as_matrix().reshape(28,28)\n",
    "    #显示图片，颜色为黑白\n",
    "    plt.imshow(grid_data, interpolation = \"none\", cmap = \"Greys\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " ...\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]]\n"
     ]
    }
   ],
   "source": [
    "# 特征预处理,将特征的值域规范化\n",
    "X = MinMaxScaler().fit_transform(X)\n",
    "print(X)\n",
    "test = MinMaxScaler().fit_transform(test)\n",
    "\n",
    "# 分开训练集和测试集\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.1, random_state = 14)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[0.7  0.71 0.72 0.73 0.74 0.75 0.76 0.77 0.78 0.79 0.8  0.81 0.82 0.83\n",
      " 0.84 0.85 0.86 0.87 0.88 0.89]\n",
      "n_components:0.70 , accuracy:0.9750 , time elaps:26.44s\n",
      "n_components:0.71 , accuracy:0.9757 , time elaps:26.35s\n",
      "n_components:0.72 , accuracy:0.9769 , time elaps:27.06s\n",
      "n_components:0.73 , accuracy:0.9760 , time elaps:27.49s\n",
      "n_components:0.74 , accuracy:0.9776 , time elaps:27.72s\n",
      "n_components:0.75 , accuracy:0.9781 , time elaps:28.63s\n",
      "n_components:0.76 , accuracy:0.9781 , time elaps:29.46s\n",
      "n_components:0.77 , accuracy:0.9781 , time elaps:30.22s\n",
      "n_components:0.78 , accuracy:0.9783 , time elaps:31.08s\n",
      "n_components:0.79 , accuracy:0.9776 , time elaps:33.13s\n",
      "n_components:0.80 , accuracy:0.9779 , time elaps:35.57s\n",
      "n_components:0.81 , accuracy:0.9771 , time elaps:36.11s\n",
      "n_components:0.82 , accuracy:0.9774 , time elaps:36.17s\n",
      "n_components:0.83 , accuracy:0.9769 , time elaps:36.98s\n",
      "n_components:0.84 , accuracy:0.9755 , time elaps:38.15s\n",
      "n_components:0.85 , accuracy:0.9748 , time elaps:39.21s\n",
      "n_components:0.86 , accuracy:0.9748 , time elaps:40.42s\n",
      "n_components:0.87 , accuracy:0.9729 , time elaps:42.43s\n",
      "n_components:0.88 , accuracy:0.9721 , time elaps:44.55s\n",
      "n_components:0.89 , accuracy:0.9717 , time elaps:47.55s\n"
     ]
    }
   ],
   "source": [
    "# 使用主成分分析,降低维度\n",
    "all_scores = []\n",
    "# 生成n_components的取值列表\n",
    "n_components = np.linspace(0.7,0.9,num=20, endpoint=False)\n",
    "print(n_components)\n",
    "def get_accuracy_score(n, X_train, X_test, y_train, y_test):\n",
    "    '''当主成分为n时,计算模型预测的准确率'''      \n",
    "    t0 = time()\n",
    "    pca = PCA(n_components = n)\n",
    "    pca.fit(X_train)\n",
    "    X_train_pca = pca.transform(X_train)\n",
    "    X_test_pca = pca.transform(X_test)\n",
    "    # 使用支持向量机分类器\n",
    "    clf = svm.SVC()\n",
    "    clf.fit(X_train_pca, y_train)\n",
    "    # 计算准确度\n",
    "    accuracy = clf.score(X_test_pca, y_test)\n",
    "    t1 = time()\n",
    "    print('n_components:{:.2f} , accuracy:{:.4f} , time elaps:{:.2f}s'.format(n, accuracy, t1-t0))\n",
    "    return accuracy \n",
    "\n",
    "for n in n_components:\n",
    "    score = get_accuracy_score(n,X_train, X_test, y_train, y_test)\n",
    "    all_scores.append(score)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl8VOX1+PHPyR7WsIQtAQKyI0sgoigUXHGpioALWq1trW3V2k2/ldbaltYvttr2a11rrVqtOyLlpwIqIu6VQFiFsCMJBMISBLIn5/fHvaHDMCGTzNyZCTnv12te3rnz3GfOjCQn97nPPY+oKsYYY0xTxUU7AGOMMc2bJRJjjDEhsURijDEmJJZIjDHGhMQSiTHGmJBYIjHGGBMSSyTGGGNCYonEGGNMSCyRGGOMCUlCtAOIhM6dO2tWVla0wzDGmGZl2bJle1U1vaF2LSKRZGVlkZubG+0wjDGmWRGR7cG0s6EtY4wxIbFEYowxJiSWSIwxxoTEEokxxpiQWCIxxhgTkhYxa8uYxpqbV8j9C/PZWVJGj7RU7pw0kMnZGdEOy5iYZInEGD9z8wqZMWc1ZVU1ABSWlDFjzmoASybGBGBDW8b4uX/h+qNJpE5ZVQ33L8yPUkTGxDY7IzHGVVldy1urd1FYUh7w9Z0lZRGOyJjmwRKJafEOHKnkhc+/5NlPt7H7qwoS4oTqWj2uXY+01MgHZ0wzYInEtFib9hzmqY+3Mmd5AeVVtYzv35n7pg6n5HAlv5i75rjhrWtP7xWlSI2JbZZITIuiqny0aS//+Ggr7+cXk5Q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XJqqvJHygfmvcvgRnwbXpDRxT1/44qvp9t3T5JcAKERmpbpVcY4JlZyTG1ENVvwIK5L/rtyeLSCvgA+BqEYkXkXTgazhFJxvjShGJc6+b9MUpxPgBcJ37XgOAXu7++nwGnOUOiyEirXyGwupzCGhb90RETlHV/6jqPTgl/XvWe6Qx9bBEYsyJXQ/cLiKrgE+AbjhrbqzCqeD6HvA/qlrUyH7zcYbE5uOUBS8HHgXi3esWL+OUG6+orwNVLQZuBF504/sMZ4jsRP4fcEXdxXbgfvdi/BqcRLaykZ/DGKv+a0ykicgzwBuqOruhtsY0B3ZGYowxJiR2RmIMICKPAGf57X5QVZ+ORjzGNCeWSIwxxoTEhraMMcaExBKJMcaYkFgiMcYYExJLJMYYY0JiicQYY0xI/j8DmT1IuuI9mQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 画出主成分和准确度的关系图，主成分n_components的临界值为0.78时，精确度最高\n",
    "plt.plot(n_components, all_scores, '-o')\n",
    "plt.xlabel('n_components')\n",
    "plt.ylabel('accuracy')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 找出识别有误的数据\n",
    "pca = PCA(n_components = 0.78)\n",
    "pca.fit(X_train)\n",
    "X_train_pca = pca.transform(X_train)\n",
    "X_test_pca = pca.transform(X_test)\n",
    "\n",
    "clf = svm.SVC()\n",
    "clf.fit(X_train_pca, y_train)\n",
    "y_pred = clf.predict(X_test_pca)\n",
    "\n",
    "errors = (y_pred != y_test)\n",
    "y_pred_errors = y_pred[errors]  #预测\n",
    "y_test_errors = y_test[errors].values  #测试Y\n",
    "X_test_errors = X_test[errors]   #测试X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[5 0 8 6 9]\n",
      "[8 9 6 8 7]\n",
      "[[0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]\n",
      " [0. 0. 0. ... 0. 0. 0.]]\n"
     ]
    }
   ],
   "source": [
    "# 查看数据\n",
    "print(y_pred_errors[:5])\n",
    "print(y_test_errors[:5])\n",
    "print(X_test_errors[:5])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlMAAAFQCAYAAACbPfvbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xm8XdP9//HXR4QgpkhERCRF+jUPFWoqNbXmKXyLIhT5egilxhhqKkW16qtoBRXzzI+aQmMo/WoJMUea0CBEBkRiTCPr98fZWdbacu899+wz7LPP+/l43Ec++6x9917nfu4+WXevtdcy5xwiIiIiUpmFGl0BERERkWamxpSIiIhIBmpMiYiIiGSgxpSIiIhIBmpMiYiIiGSgxpSIiIhIBmpMtcPMBpiZM7OFk+2HzGxIo+sllVE+i0O5LBblszhaNZeFaEyZ2SQz+8LMPjWzqWZ2rZl1r/Z5nHM7OueuK7M+23WwjzOzz5I6f2pmV1evps2tSfO5vpk9b2afJ/+uX72aNq8mzeU2ZvaCmc0ys7fMbGj1atrcmjSfXczsXDN738xmm9lYM1umerVtTk2ay13N7NWkzv9nZmtWr6bZFKIxldjVOdcd+B6wEXB6WGgleXu/6znnuidfhzW6MjnTNPk0s0WAe4EbgWWB64B7k9eluXLZFbgHuBJYGvgJcLGZrdfQiuVL0+QzcTawGbApsBRwIPBlQ2uU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LsC9xXnWpJAyifxaFcFovyWRzKZUFVPGbKOTfXzI4CRgFdgD87516rWs2krpTP4lAui0X5LA7lsriyDEDHOfcg8GCV6iINpnwWh3JZLMpncSiXxaQZ0EVEREQyUGNKREREJAM1pkREREQyUGNKREREJAM1pkREREQyUGNKREREJINMUyOI5M2XX34Zbf/hD3/w8SOPPOLjxx57LNpv3rx5Pl5xxRWjsssvv9zHu+66a1TWpUuXyisrDXfHHXdE2//93//d5r79+/f38aRJk2pVJWnH3/72t2j7jTfe8PHUqVOjssmTJ/v4jDPOiMr69u1bg9pJK9OdKREREZEM1JgSERERyUDdfB2YMWOGjw855JCo7P777/fxNttsE5UtvvjiPh48eHBUdvDBB1exhhJ27W244YZR2fjx4xf4PRtttFG0vfDC31wKn3/+eVS29957+/iaa66JyoYMGdK5ykrDhTm76aaborKFFmr770szq1mdWtGHH37o4/Cz9De/+U2038SJE308d+7cqCzsnm8vP0sttVS0fdFFF3WusiId0J0pERERkQzUmBIRERHJQI0pERERkQw0ZmoBwn75U0891ccPPhgv9B320Q8aNCgqGz16tI+HDx8elWnMVHWF0x+kx0gtv/zyPr7tttt8vNlmm0X7hVMcfPXVV1HZTjvt5OPPPvssW2WlLmbNmuXjHXfcMSp77rnnfOycK/uYs2fP9nE4xgdgl1126WwVW056LNTZZ5/t4y+++KKiY5Y7ji09BYbGTDXOH//4Rx8feeSRUVn4/+gTTzwRlS2xxBI1rVdWujMlIiIikoEaUyIiIiIZqJtvAcJZdtOPwofWXnttH++///5RWdg9uN9++0VlEyZM8PHAgQMrrmer+uCDD6LtsBs1fdt/66239vEPfvCDso6/6KKLRtsbbLCBjw844ICy6yn188knn0TbP/7xj30cdutl8fHHH/v49ttvj8rUzbdgYdde+JkI8bQGoUMPPTTa3nzzzX38k5/8pM1zDRs2LNq+5557fPzQQw91XFmpiVGjRkXbJ510ko/Tn9fPP/+8j9NdgNdee62P25vCpFHyVyMRERGRJqLGlIiIiEgGakyJiIiIZKAxU8C7774bbe+2224+XmGF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6LSTOgi4iIiGSgxpSIiIhIBpm6+VrNp59+Gm0fffTRPj7yyCOjso022qgudRIREZHG0p0pERERkQzUmBIRERHJQI0pERERkQw0ZqoD77//zeS0G2+8cVQ2ffp0Hx9zzDF1q5NUJsxXeuHQJ5980scDBw6MypZYYgkfL7ywLhmRSnz11VfR9quvvurjs846y8cPPPBAm8dIj0XdfPPNfbzPPvtEZZtuumkl1RSpiO5MiYiIiGSgxpSIiIhIBuqzWIBZs2b5eLPNNvPx0ksvHe0X3qZeZpllal8x6dDs2bOj7ZNPPtnHd999t4+/+OKLaL/vf//7bR5z11139fGNN94YlXXv3r2ieso3JkyYEG2ff/75Ph45cmSb3+ec87GZtbnfhRdeGG2feOKJnayhVCrs2jv44IOjsttvv72sY4S5HTNmTFQWbv/xj3+Myp599lkfr7POOmWdS6RSujMlIiIikoEaUyIiIiIZqDElIiIikoHGTBGPvQAYPHiwj/v27evjm2++OdpP46Qa48svv4y2H3zwmwXYDzvssKjsk08+WeAxjjvuuGh79913b/P4O++8s4/33HPPqOzRRx8to8aS9vTTT/t4hx12iMrC8Wxdu3aNyrbZZhsfh9ft448/Hu03d+5cH5999tlR2UEHHeTj3r17d6ba0oH//Oc/0fY555zj43LHSHXr1i3a7tmzZ5v7hp/VV111VVT2yiuv+FhjpprDzJkzfRyOdwU44YQTfJyeviYPdGdKREREJAM1pkREREQyUDcfMGXKlGi7V69ePt5333193L9//7rVSWLhI9Z77bVXVDZq1KiyjnHsscf6+Fe/+lVUtthii7X5fb/+9a99nL71LOUJVxKAeLqJ9DQVm2yyiY/Ts2G31bUedg8AjB07doHnArjgggt8/Pvf/769aksZwq69sFsP4mku0tNXLL744j4Op69I56tfv35l1SN9/H/9619lfZ80TtgdDzBs2DAf33rrrVFZ+Dlx/fXX17ZiFdCdKREREZEM1JgSERERyUCNKREREZEMNGYKOP3006PtF1980cfXXXddvasjCxAuRfHwww9HZeFYidVWWy0q++1vf+vjbbfd1sftjZFKS/frh8Lxdn369Cn7mK1m4s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PAf5nZZDM7FLgA2N7MJgDbJ9vSBJTP4lAui0X5LA7lsvWU8zTffm0UbdvG65JjymdxKJfFonwWh3LZerSczAKEYz3efvttHx999NHRfuHAwGo/ni/1FY7Z+NOf/hSVbbHFFj7ecccd61WlpheOjTjyyCOjsvQ0I7U0bty4up2rFa233no+XmmllaKyd99918fhlBQAX375pY/Dx+XTUyg8/fTTPn7++efLrtcxxxzj48022ywqGzBgQNnHkW+EOUxfw+FSXuH/jekphD777DMff/3111HZ9773PR+np1TIOy0nIyIiIpKBGlMiIiIiGaibbwHC25InnHCCj9O3HcNuv4MPPjgq69KlS20qJxULu3sef/zxqOycc87xcdj9ALDnnnv6OD1lg5Rn0UUXjbbr+dj6zJkz63auVnT99df7ePLkyW3ul34kPpw5PXwMPt0dGH5fe4/Vp7/vo48+8vG6664blY0YMcLH++67b5vHbHXpfN577zcPIP785z8v6xjhEAqArbfe2scvvfRSVBYes2vXruVWMxd0Z0pEREQkAzWmRERERDJQn0UHwif7wtuTEM+Une7+GTJkCFIf9913n4/TM20/9dRTC/ye9roS0s4++2wfpxfNDbt6m+22tEg1lLtwbaUWWWQRH6efwgtXr0hf0xdffLGPp02LJxsPn/RLz5Dfr1+/iutaBOEwh/TKE+3lep111vHxI4884uN0XsKZ0tPCmdObje5MiYiIiGSgxpSIiIhIBmpMiYiIiGSgMVMdCPvrzz///Khs8ODBPk73LYeP0y+11FI1ql1r+uCDD6Lt/fff38fh49bQ9liocCwcwNVXX+3j9BQY4cr0J554YlQWjgc4/vjj26u2NEh6nFuYs/R4DunYxx9/HG3ffffdNT3fP/7xDx+Hs6135JBDDvHxUUcdFZXdcccdPj755JOjsptvvrmzVSyUK664wsf//Oc/o7Lw8zSc8Rzg1FNP9fGSSy7p47/+9a/RfuHs6LvttltUttpqq1VQ43zQnSkRERGRDNSYEhEREclA3XydkO4aChfAPfbYY6Oyvffe28cPPPBAVKZH6LNJP56b7toLhTnbbrvtfHzttddG+/Xo0aPNY/z+97/38fjx46OyRx991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CjQDuoiIiEgGakyJiIiIZKDGlIiIiEgGZU2NICXpFcRXWGEFH4fTJEh26623XptlCy8c/9qGy8kcf/zxUdnzzz/v4/AR6w8//DDa76677mrzfOE4qXCJCoiXnpDq+/zzz6PtcDzLNddc4+P2HnU/+uij29wOpz4B2GcfjQeulXDpF4AzzjjDx+F0MT/+8Y+j/cJr9cwzz4zK3nzzTR+H4x4BdthhBx+nx/eE13RRlzeptfSUFR9//LGPw+kQwukrikx3pkREREQyUGNKREREJAN180kubbDBBtF2elbytqRv9Yfbu+66a/aKSc09+eSTPh48eHBUFnYlhHr37h1t/+QnP/HxnDlzorI//elPPk4/Br/bbrv5eNFFFy2zxpJVv379fJxeZUDyI5y1Pr0SRejwww+vR3VyRXemRERERDJQY0pEREQkAzWmRERERDLQmCkRyZWtttrKx+FyIdVy+eWXV/2YIq0gnJbmsssui8oOOuggH/ft27dudcoL3ZkSERERyUCNKREREZEM1M0nIiIinbLOOutE22PHjm1QTfJBd6ZEREREMlBjSkRERCQDNaZEREREMlBjSkRERCQDNaZEREREMlBjSkRERCQDc87V72Rm04G3gZ5A9ac27rxWq0d/51yvahxIuWxXPepStVyCz+dntNbPsBy6NrPLSz1A12Y15CWfubo269qY8ic1G+OcG1T3E6seVZeXuuelHpCvunRGnuqdl7rkpR6VyEvd81IPyFddOiNP9c5LXfJSj/nUzSciIiKSgRpTIiIiIhk0qjE1okHnTVM9sstL3fNSD8hXXTojT/XOS13yUo9K5KXueakH5KsunZGneuelLnmpB9CgMVMiIiIiRaFuPhEREZEM6tqYMrMdzGy8mU00s+F1PvefzWyamb0avNbDzB41swnJv8vWoR79zOxxMxtnZq+Z2TGNqksWymVxcgnKZ3LOQuRTuSxOLkH5bJZc1q0xZWZdgMuBHYE1gf3MbM16nR8YCeyQem04MNo5NxAYnWzX2lzgeOfcGsAmwLDk59CIulREufSaPpegfAaaPp/Kpdf0uQTlM9EcuXTO1eUL2BQYFWyfApxSr/Mn5xwAvBpsjwf6JHEfYHw965Oc915g+zzURblsvVwqn8XKp3JZnFwqn82Vy3p28/UF3g22JyevNVJv59wUgOTf5et5cjMbAGwA/LPRdekk5TKliXMJyue3NHE+lcuUJs4lKJ+RPOeyno0pW8BrLfsooZl1B+4CjnXOzWp0fTpJuQw0eS5B+Yw0eT6Vy0CT5xKUTy/vuaxnY2oy0C/YXgl4v47nX5CpZtYHIPl3Wj1OamZdKf1S3OScu7uRdamQcpkoQC5B+fQKkE/lMlGAXILySXKe3Oeyno2p54CBZvYdM1sE2Be4r47nX5D7gCFJPIRSX2xNmZkB1wDjnHMXN7IuGSiXFCaXoHwChcmncklhcgnKZ/Pkspjc47gAAACMSURBVM4Dx3YC/gW8CZxW53PfAkwB/kOptX8osBylpwAmJP/2qEM9tqB0m/Zl4MXka6dG1EW5VC6Vz+LlU7ksTi6Vz+bJpWZAFxEREclAM6CLiIiIZKDGlIiIiEgGakyJiIiIZKDGlIiIiEgGakyJiIiIZKDGlIiIiEgGakyJiIiIZKDGlIiIiEgG/x8Rdu0Y6uw/5AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x432 with 10 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 数据可视化,查看预测有误的数字\n",
    "n = 0\n",
    "nrows = 2\n",
    "ncols = 5\n",
    "\n",
    "fig, ax = plt.subplots(nrows,ncols,figsize=(10,6))\n",
    "\n",
    "for row in range(nrows):\n",
    "    for col in range(ncols):\n",
    "        ax[row,col].imshow((X_test_errors[n]).reshape((28,28)), cmap = \"Greys\")\n",
    "        ax[row,col].set_title(\"Predict:{}\\nTrue: {}\".format(y_pred_errors[n],y_test_errors[n]))\n",
    "        n += 1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 建模"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "39\n"
     ]
    }
   ],
   "source": [
    "# n_components为0.78时, 模型的准确率最高\n",
    "# 对训练集和测试集进行PCA降低维度处理, 主成分个数为39\n",
    "pca = PCA(n_components=0.78)\n",
    "pca.fit(X)\n",
    "# 打印主成分个数\n",
    "print(pca.n_components_)\n",
    "# 对训练集和测试集进行主成分转换\n",
    "X = pca.transform(X)\n",
    "test = pca.transform(test)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Fitting 5 folds for each of 12 candidates, totalling 60 fits\n",
      "[CV] C=1, kernel=linear ..............................................\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Using backend SequentialBackend with 1 concurrent workers.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] ............................... C=1, kernel=linear, total=  27.5s\n",
      "[CV] C=1, kernel=linear ..............................................\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:   27.4s remaining:    0.0s\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] ............................... C=1, kernel=linear, total=  27.7s\n",
      "[CV] C=1, kernel=linear ..............................................\n",
      "[CV] ............................... C=1, kernel=linear, total=  25.9s\n",
      "[CV] C=1, kernel=linear ..............................................\n",
      "[CV] ............................... C=1, kernel=linear, total=  26.8s\n",
      "[CV] C=1, kernel=linear ..............................................\n",
      "[CV] ............................... C=1, kernel=linear, total=  27.5s\n",
      "[CV] C=1, kernel=rbf .................................................\n",
      "[CV] .................................. C=1, kernel=rbf, total=  24.5s\n",
      "[CV] C=1, kernel=rbf .................................................\n",
      "[CV] .................................. C=1, kernel=rbf, total=  23.8s\n",
      "[CV] C=1, kernel=rbf .................................................\n",
      "[CV] .................................. C=1, kernel=rbf, total=  23.7s\n",
      "[CV] C=1, kernel=rbf .................................................\n",
      "[CV] .................................. C=1, kernel=rbf, total=  23.6s\n",
      "[CV] C=1, kernel=rbf .................................................\n",
      "[CV] .................................. C=1, kernel=rbf, total=  23.5s\n",
      "[CV] C=1, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=1, kernel=sigmoid, total=  29.4s\n",
      "[CV] C=1, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=1, kernel=sigmoid, total=  29.6s\n",
      "[CV] C=1, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=1, kernel=sigmoid, total=  30.4s\n",
      "[CV] C=1, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=1, kernel=sigmoid, total=  29.5s\n",
      "[CV] C=1, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=1, kernel=sigmoid, total=  29.4s\n",
      "[CV] C=2, kernel=linear ..............................................\n",
      "[CV] ............................... C=2, kernel=linear, total=  36.7s\n",
      "[CV] C=2, kernel=linear ..............................................\n",
      "[CV] ............................... C=2, kernel=linear, total=  36.6s\n",
      "[CV] C=2, kernel=linear ..............................................\n",
      "[CV] ............................... C=2, kernel=linear, total=  35.7s\n",
      "[CV] C=2, kernel=linear ..............................................\n",
      "[CV] ............................... C=2, kernel=linear, total=  37.1s\n",
      "[CV] C=2, kernel=linear ..............................................\n",
      "[CV] ............................... C=2, kernel=linear, total=  37.6s\n",
      "[CV] C=2, kernel=rbf .................................................\n",
      "[CV] .................................. C=2, kernel=rbf, total=  23.1s\n",
      "[CV] C=2, kernel=rbf .................................................\n",
      "[CV] .................................. C=2, kernel=rbf, total=  23.5s\n",
      "[CV] C=2, kernel=rbf .................................................\n",
      "[CV] .................................. C=2, kernel=rbf, total=  23.1s\n",
      "[CV] C=2, kernel=rbf .................................................\n",
      "[CV] .................................. C=2, kernel=rbf, total=  22.5s\n",
      "[CV] C=2, kernel=rbf .................................................\n",
      "[CV] .................................. C=2, kernel=rbf, total=  22.7s\n",
      "[CV] C=2, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=2, kernel=sigmoid, total=  27.3s\n",
      "[CV] C=2, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=2, kernel=sigmoid, total=  27.0s\n",
      "[CV] C=2, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=2, kernel=sigmoid, total=  27.3s\n",
      "[CV] C=2, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=2, kernel=sigmoid, total=  27.3s\n",
      "[CV] C=2, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=2, kernel=sigmoid, total=  27.2s\n",
      "[CV] C=4, kernel=linear ..............................................\n",
      "[CV] ............................... C=4, kernel=linear, total=  53.3s\n",
      "[CV] C=4, kernel=linear ..............................................\n",
      "[CV] ............................... C=4, kernel=linear, total=  52.7s\n",
      "[CV] C=4, kernel=linear ..............................................\n",
      "[CV] ............................... C=4, kernel=linear, total=  52.0s\n",
      "[CV] C=4, kernel=linear ..............................................\n",
      "[CV] ............................... C=4, kernel=linear, total=  54.8s\n",
      "[CV] C=4, kernel=linear ..............................................\n",
      "[CV] ............................... C=4, kernel=linear, total=  53.2s\n",
      "[CV] C=4, kernel=rbf .................................................\n",
      "[CV] .................................. C=4, kernel=rbf, total=  20.9s\n",
      "[CV] C=4, kernel=rbf .................................................\n",
      "[CV] .................................. C=4, kernel=rbf, total=  21.0s\n",
      "[CV] C=4, kernel=rbf .................................................\n",
      "[CV] .................................. C=4, kernel=rbf, total=  20.8s\n",
      "[CV] C=4, kernel=rbf .................................................\n",
      "[CV] .................................. C=4, kernel=rbf, total=  22.2s\n",
      "[CV] C=4, kernel=rbf .................................................\n",
      "[CV] .................................. C=4, kernel=rbf, total=  22.2s\n",
      "[CV] C=4, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=4, kernel=sigmoid, total=  26.3s\n",
      "[CV] C=4, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=4, kernel=sigmoid, total=  26.4s\n",
      "[CV] C=4, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=4, kernel=sigmoid, total=  25.9s\n",
      "[CV] C=4, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=4, kernel=sigmoid, total=  26.6s\n",
      "[CV] C=4, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=4, kernel=sigmoid, total=  27.3s\n",
      "[CV] C=5, kernel=linear ..............................................\n",
      "[CV] ............................... C=5, kernel=linear, total= 1.1min\n",
      "[CV] C=5, kernel=linear ..............................................\n",
      "[CV] ............................... C=5, kernel=linear, total= 1.3min\n",
      "[CV] C=5, kernel=linear ..............................................\n",
      "[CV] ............................... C=5, kernel=linear, total= 1.1min\n",
      "[CV] C=5, kernel=linear ..............................................\n",
      "[CV] ............................... C=5, kernel=linear, total= 1.1min\n",
      "[CV] C=5, kernel=linear ..............................................\n",
      "[CV] ............................... C=5, kernel=linear, total= 1.1min\n",
      "[CV] C=5, kernel=rbf .................................................\n",
      "[CV] .................................. C=5, kernel=rbf, total=  23.5s\n",
      "[CV] C=5, kernel=rbf .................................................\n",
      "[CV] .................................. C=5, kernel=rbf, total=  23.4s\n",
      "[CV] C=5, kernel=rbf .................................................\n",
      "[CV] .................................. C=5, kernel=rbf, total=  23.4s\n",
      "[CV] C=5, kernel=rbf .................................................\n",
      "[CV] .................................. C=5, kernel=rbf, total=  23.9s\n",
      "[CV] C=5, kernel=rbf .................................................\n",
      "[CV] .................................. C=5, kernel=rbf, total=  23.8s\n",
      "[CV] C=5, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=5, kernel=sigmoid, total=  29.1s\n",
      "[CV] C=5, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=5, kernel=sigmoid, total=  28.3s\n",
      "[CV] C=5, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=5, kernel=sigmoid, total=  30.1s\n",
      "[CV] C=5, kernel=sigmoid .............................................\n",
      "[CV] .............................. C=5, kernel=sigmoid, total=  33.0s\n",
      "[CV] C=5, kernel=sigmoid .............................................\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[CV] .............................. C=5, kernel=sigmoid, total=  32.3s\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[Parallel(n_jobs=1)]: Done  60 out of  60 | elapsed: 32.6min finished\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'C': 5, 'kernel': 'rbf'}\n"
     ]
    }
   ],
   "source": [
    "# 使用支持向量机预测,使用网格搜索进行调参\n",
    "\n",
    "clf_svc = GridSearchCV(estimator=svm.SVC(), param_grid={ 'C': [1, 2, 4, 5], 'kernel': [ 'linear', 'rbf', 'sigmoid' ] }, cv=5, verbose=2 ) \n",
    "# 训练算法\n",
    "clf_svc.fit(X, y)\n",
    "# 显示使模型准确率最高的参数\n",
    "print(clf_svc.best_params_)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Over\n"
     ]
    }
   ],
   "source": [
    "# 预测\n",
    "preds = clf_svc.predict(test)\n",
    "image_id = pd.Series(range(1,len(preds)+1))\n",
    "result_2 = pd.DataFrame({'ImageID': image_id,'Label':preds})\n",
    "# 保存为CSV文件\n",
    "result_2.to_csv('result_svc.csv',index = False)\n",
    "print('Over')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
